package com.etocrm.saas.lib.base.server.filter;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.core.Ordered;

/**
 * requestWrapper filter 注册类
 * Created by Xs on 2022/12/14.
 */
public class RequestWrapperFilterRegister {

    @Bean
    public FilterRegistrationBean<RequestWrapperFilter> orderFilter() {
        FilterRegistrationBean<RequestWrapperFilter> filter = new FilterRegistrationBean<>();
        filter.setName("requestWrapperFilter");
        filter.setFilter(new RequestWrapperFilter());
        filter.setOrder(Ordered.HIGHEST_PRECEDENCE);
        return filter;
    }
}
